VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "Mscomctl.ocx"
Begin VB.Form frm3Etapa 
   BackColor       =   &H00000000&
   BorderStyle     =   5  'Sizable ToolWindow
   ClientHeight    =   4710
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   6345
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   4710
   ScaleWidth      =   6345
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdSalir 
      Caption         =   "Salir"
      Height          =   372
      Left            =   5160
      TabIndex        =   3
      Top             =   4200
      Width           =   852
   End
   Begin VB.CommandButton cmdAceptar 
      Caption         =   "Aceptar"
      Height          =   372
      Left            =   4200
      TabIndex        =   2
      Top             =   4200
      Width           =   852
   End
   Begin MSComctlLib.ListView VistaPSEventuales 
      Height          =   3372
      Left            =   240
      TabIndex        =   0
      Top             =   600
      Width           =   5772
      _ExtentX        =   10186
      _ExtentY        =   5953
      View            =   3
      Sorted          =   -1  'True
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      AllowReorder    =   -1  'True
      Checkboxes      =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   16777215
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   2
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "Codigo Empleado"
         Object.Width           =   2646
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "Nombre Empleado"
         Object.Width           =   7056
      EndProperty
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "Trabajadores de la Tercera Etapa, Parque Santo Eventuales"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   252
      Left            =   240
      TabIndex        =   1
      Top             =   240
      Width           =   5652
   End
End
Attribute VB_Name = "frm3Etapa"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdAceptar_Click()
    
 
 X = FechaPublica
     If VistaPSEventuales.ListItems.Count > 0 Then
        DE.Cnn.Execute "delete from LugarTrabajoConta"
        For i = 1 To VistaPSEventuales.ListItems.Count
            If VistaPSEventuales.ListItems(i).Checked Then
               DE.Cnn.Execute "INSERT  LugarTrabajoConta (fechaplanilla,codigoempleado, CodigoLugarTrabajo) VALUES ('" & FechaPublica & "','" & Me.VistaPSEventuales.ListItems(i) & "'," & 1 & ")"
            End If
        Next i
    End If
    Unload Me
   


End Sub

Private Sub CmdSalir_Click()
    Unload Me
End Sub

Private Sub Form_Load()
   Left = Screen.Width / 2 - Width / 2
    Top = (Screen.Height / 2 - Height / 2) - 800
        
    LlenarVista

   

End Sub
Private Sub LlenarVista()
' On Error Resume Next

    Dim dTotal As Double
    Dim itm As ListItem
    Dim I_contador As Integer
  
    I_contador = 0
    dTotal = 0
    
    If FechaPublica = "__/__/____" Or FechaPublica = "" Then Exit Sub
    
    Me.VistaPSEventuales.ListItems.Clear
    
    If DE.rsLosEventuales3Etapa.State = adStateOpen Then DE.rsLosEventuales3Etapa.Close
    DE.LosEventuales3Etapa FechaPublica
    
    '' esta es la consulta para ver todos los que estan como prospectos
    
    While Not DE.rsLosEventuales3Etapa.EOF
       Set itm = Me.VistaPSEventuales.ListItems.Add(, , DE.rsLosEventuales3Etapa.Fields("codigo_empleado").Value)
            itm.SubItems(1) = DE.rsLosEventuales3Etapa.Fields("nombres").Value
            DE.rsLosEventuales3Etapa.MoveNext
     Wend

  End Sub
